<template>
    <div id="code">
        <div class="headers">分享</div>
        <div class="code">
            <div class="code_top">
                <p class="img"><img :src="data.photo" alt=""></p>
                <p>{{ data.userName }}</p>
            </div>
            <div class="code_b">
                <h3>贵宾，您好！</h3>
                <p>{{data.stayPerson}}（{{data.stayMobile}}）已帮您预定了{{data.liveTime}}{{data.hotelName}}“{{data.roomName}}”{{data.bookingRoomsNum}}， 共计：{{data.sellPrice}}元请您在30分钟内，扫码进行支付，否则订单过期失效！</p>
            </div>
            <div class="footer" style="width:100%;text-align:center">
                 <img :src="data.url" alt="" style="width:3.06rem;height:3.06rem">
                  <p style="color:#999999;font-size:.24rem;margin-top:.18rem;">请您长按小程序码，前往支付页面</p>
            </div>           
        </div>
    </div>
</template>
<script>
import { XHeader } from "vux";
import { orderView } from "@/service/home.js";
import axios from "axios";
export default {
  components: {
    XHeader
  },
  data() {
    return {
      orderNum: sessionStorage.orderNum,
      data: ""
    };
  },
  mounted() {
    this._orderView();
  },
  methods: {
    _orderView() {
      var orderNum = this.$route.query.orderNum;
      axios.post("/marketing/orderView?orderNum=" + orderNum).then(res => {
        this.data = res.data;
      });
    }
  }
};
</script>
<style scoped lang="less">
#code {
  width: 100%;
  height: 700px;
  background-image: linear-gradient(top, #983BA5, #D363E1);
  padding-top: 0.3rem;
  .headers {
    color: #fff;
    text-align: center;
    line-height: 0.5rem;
    margin: 0 0 0.7rem 0;
    font-size: 0.34rem;
  }
  .code {
    background: url(../../../assets/QrCode.png) no-repeat;
    background-size: 100%;
    width: 7rem;
    height: 10.64rem;
    margin: 0 auto;
    .code_top {
      text-align: center;
      p {
        color: #000000;
        font-size: 0.3rem;
      }
      span {
        font-size: 0.24rem;
        color: #999999;
      }
      .img {
        width: 100%;
        padding-top: 0.5rem;
        padding-bottom: 0.2rem;
        img {
          width: 1rem;
          height: 1rem;
          border-radius: 50%;
        }
      }
    }
    .code_b {
      h3 {
        height: 0.34rem;
        line-height: 0.34rem;
        color: #2a2a2a;
        font-size: 0.36rem;
        margin-top: 1.29rem;
        margin-bottom: 0.27rem;
        text-align: center;
      }
      p {
          width: 6.34rem;
          margin: 0 auto;
        font-size: 0.3rem;
        color: #323232;
        margin-bottom: 0.17rem;
        //margin-left: 0.74rem;
      }
    }
  }
}
</style>
